cmake_minimum_required(VERSION 3.1)
project(network-lab7)

find_package(Threads)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(src_dir "${PROJECT_SOURCE_DIR}/src")
set(bin_dir "${PROJECT_SOURCE_DIR}/bin")
set(include_dir "${PROJECT_SOURCE_DIR}/include")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${bin_dir})

include_directories(${include_dir})

add_executable("client" "${src_dir}/client.cpp" "${src_dir}/uniform_time.cpp" "${src_dir}/uniform_socket.cpp")
add_executable("server" "${src_dir}/server.cpp" "${src_dir}/uniform_time.cpp" "${src_dir}/uniform_socket.cpp")
target_link_libraries("client" ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries("server" ${CMAKE_THREAD_LIBS_INIT})

